package com.fileLoader.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Service;

import com.fileLoader.pojo.mongo.FilePositionSetting;
import com.fileLoader.service.FilePositionSettingService;

@Service
public class FilePositionSettingServiceImpl implements FilePositionSettingService {
	@Autowired
	MongoTemplate mongoTemplate;

	public List<FilePositionSetting> getNeedStatisticsList() {
		Query query = Query.query(Criteria.where("status").is(1).and("writeFilePositions.status").is(1)
				.and("moveFilePositions.status").is(1));
		List<FilePositionSetting> list = mongoTemplate.find(query, FilePositionSetting.class);
		return list;
	}

	


}
